package org.jjj.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jjj.org.basic.domain.BaseDomain;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class Department extends BaseDomain {
    private String name;
    private String intro;
    private Date create_time;
    private Date update_time;
    private String path;
    private Integer state;

    private Employee manager;//部门管理者
    private Department parent;//父级部门
    private List<Department> children;//父部门下的子部门
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    public Date getCreate_time() {
        return create_time;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    public Date getUpdate_time() {
        return update_time;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
}
